package com.opennews.openplatform.service;

import com.opennews.openplatform.dto.OrderDto;
import lombok.RequiredArgsConstructor;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Service;

@RequiredArgsConstructor
@Service
public class OrderNotificationService {
    public static final String TOPIC = "order-topic";

    @KafkaListener(topics = TOPIC, groupId = "notification-service-consumer")
    public void consume(OrderDto orderDto) {
        System.out.println("Notification message received: " + orderDto);
    }
}
